<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<title>运维管理</title>
<script type="text/javascript" src="/lib/js/jquery.js"></script>
<script type="text/javascript" src="/lib/layui/layui.js"></script>
<script type="text/javascript" src="/lib/js/echarts.common.min.js"></script>
<link rel="stylesheet" href="/lib/layui/css/layui.css">
<link rel="stylesheet" href="/lib/css/base.css">
<style>
.layui-nav-tree .layui-nav-child .active, .layui-nav-tree .layui-nav-child dd:hover
	{
	background: #0695ff;
}
</style>
</head>

<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header"><#include '/common/top.ftl'></div>

		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				<#include '/common/left.ftl'>
			</div>
		</div>

		<div class="layui-body">
			<div class="place">您所在的位置: 开发管理 > 代码日统计</div>
			<!-- 内容主体区域 -->
		      <div class="manage" style="padding: 15px;">
		         
		          <div class="layui-tab">
		              <div id="chart1" style="width:900px;height:350px;"></div>
				  </div>
		
		 		<form class="layui-form listForm" method="GET">
		          <div class="layui-form">
		         	<div class="layui-form-item">
		               <div class="layui-inline">
			              <label class="layui-form-label">日期:</label>
			              <div class="layui-input-block">
			                <input type="text" class="layui-input" id="date" name="date" value="${date?string('yyyy-MM-dd')}">
			              </div>
			            </div>
		                 <div class="layui-inline">
		                         <button class="layui-btn  layui-btn-normal">查询</button>
		                 </div>
		               </div>
		          </div>
		          </form>
		
				 <table class="layui-table">
			        <thead>
			        <tr>
			            <th>日期</th>
			            <th>用户</th>
			            <th>提交文件数</th>
			        </tr>
			        </thead>
					<#if statlist?exists >
                        <#list statlist as st>
							<tr>
                                <td>${st.statDate?string('yyyy-MM-dd')}</td>
                                <td>${st.user}</td>
                                <td>${st.fileTotal!}</td>

                            </tr>
                        </#list>
                    <#else>
							<tr>
                                <td class="text-center danger" colspan="7">没有数据</td>
                            </tr>
                    </#if>
		    	</table>
		    
		      </div>
		</div>

		<div class="layui-footer">
			<!-- 底部固定区域 -->
			<#include '/common/bottom.ftl' >
		</div>
	</div>

  <script type="text/javascript"> 
  
   		layui.use('form', function () {
	         var form = layui.form;
	         form.render();
	     });
     
       layui.use('laydate', function(){
		  var laydate = layui.laydate;
		  
		  //执行一个laydate实例
		  laydate.render({
		     elem: '#date'
		  });
		});
	     
       layui.use('element', function(){
       	  var element = layui.element;
       });
       
  </script>
  
	<script type="text/javascript">

        // 基于准备好的dom，初始化echarts实例
        var chart1 = echarts.init(document.getElementById('chart1'));

        option = {
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'cross',
                    crossStyle: {
                        color: '#999'
                    }
                }
            },
            legend: {
                data:['提交文件统计',]
            },
            xAxis: [
                {
                    type: 'category',
                    data: [${days}],
                    axisPointer: {
                        type: 'shadow'
                    }
                }
            ],
            yAxis: [
                {
                    type: 'value'
                }
            ],
            series: [
                {
                    name:'提交文件统计',
                    type:'line',
                    data:[${totals}]
                }
            ]
        };

        // 使用刚指定的配置项和数据显示图表。
        chart1.setOption(option);
    </script>    
</body>

</html>